package top.laoshuzi.common.ui.engine;


import android.content.Context;

import com.coorchice.library.ImageEngine;
import com.coorchice.library.image_engine.Engine;

public class PicassoEngine implements Engine {

    private Context context;

    public PicassoEngine(Context context) {
        this.context = context;
    }

    @Override
    public void load(String url, final ImageEngine.Callback callback) {
//        Picasso.with(context).load(url).into(new Target() {
//            @Override
//            public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
//                // 主要是通过callback返回Drawable对象给SuperTextView
//                callback.onCompleted(new BitmapDrawable(Resources.getSystem(), bitmap));
//            }
//
//            @Override
//            public void onBitmapFailed(Drawable errorDrawable) {
//
//            }
//
//            @Override
//            public void onPrepareLoad(Drawable placeHolderDrawable) {
//
//            }
//        });
    }
}
